﻿@model CNav.Model.UserProfileModel

@{
    ViewBag.Title = "Delete user account";
}

@using (Html.BeginForm("Edit", "UserProfile", FormMethod.Post, new { name = "frmMain", id = "frmMain" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <div id="editProfileAccordion">
        <ol>
            <li>
                @Html.LabelFor(m => m.Title)
                @Html.DisplayFor(model => model.Title)
            </li>

            <li>
                @Html.LabelFor(m => m.FirstName)
                @Html.DisplayFor(model => model.FirstName)
            </li>

            <li>
                @Html.LabelFor(m => m.Lastname)
                @Html.DisplayFor(model => model.Lastname)
            </li>
            <li>
                @Html.LabelFor(m => m.Email)
                @Html.DisplayFor(model => model.Email)
            </li>
            <li>
                @Html.LabelFor(m => m.UserPosition)
                @Html.DisplayFor(model => model.UserPosition)
            </li>
            <li>
                @Html.LabelFor(m => m.PhoneNumber)
                @Html.DisplayFor(model => model.PhoneNumber)
            </li>

            <li>
                @Html.LabelFor(m => m.FaxNumber)
                @Html.DisplayFor(model => model.FaxNumber)
            </li>

            <li>
                @Html.LabelFor(m => m.AccountExpireDate)
                @Html.DisplayFor(model => model.AccountExpireDate, Model.AccountExpireDate.ToShortDateString())
            </li>

            <li>
                <label>&nbsp;</label>
                @Html.HiddenFor(m => m.ID)
                @if (!Model.IsBusinessAdmin)
                {
                    <input type="submit" value="Delete" id="deleteButton" />
                }
                <input type="button" value="Cancel" id="cancelButton" />
            </li>

        </ol>
    </div>
}

<script type="text/javascript">

    $(document).ready(function () {

        var cc = new CaseCentre();
        cc.BindCancel('#cancelButton', '@Url.Content("~/UserProfile/")');
        cc.Datepicker('#AccountExpireDate');
        
    });
</script>
